/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 38917
 * Date: 2025-03-27
 * Time: 00:13
 */
public class WAITING {
    public static void main(String[] args) throws InterruptedException {
        Object locker = new Object();
        Thread thread = new Thread(()->{
            synchronized (locker){
                try {
                    //无时间参数的wait
                    locker.wait();
                } catch (InterruptedException e) {
                    throw new RuntimeException(e);
                }
            }
        });
        thread.start();
        Thread.sleep(100);
        //WAITING
        System.out.println(thread.getState());
    }
}
